---------------------------------------------------------------------------------------
# НАСТРОЙКА МОНИТОРОВ
---------------------------------------------------------------------------------------
monitor=HDMI-A-1,1920x1080,0x0,1


plugin {
    hyprbars {
        bar_color = rgba(f9f9f9ff)
        bar_height = 20
        bar_text_color = rgba(272a34ff)
        bar_text_size = 10
        bar_text_font
    }
}


---------------------------------------------------------------------------------------
# АВТОЗАПУСК
---------------------------------------------------------------------------------------
exec-once = firefox & telegram-desktop
exec-once = hyprpaper
exec-once = waybar


---------------------------------------------------------------------------------------
# ПОДКЛЮЧЕНИЕ ФАЙЛА КОНФИГУРАЦИИ
---------------------------------------------------------------------------------------
# source = ~/.config/hypr/myColors.conf


---------------------------------------------------------------------------------------
# НАСТРОЙКА КЛАВИАТУРЫ
---------------------------------------------------------------------------------------
input {
    kb_layout = us,ru
    kb_variant =
    kb_model =
    kb_options = grp:alt_shift_toggle
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = no
    }

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}


---------------------------------------------------------------------------------------
# ГАПСЫ, БОРДЕРЫ, ЦВЕТА...
---------------------------------------------------------------------------------------

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 5
    gaps_out = 10
    border_size = 0
    col.active_border = rgba(d8dee8ff)
    col.inactive_border = rgba(2f343fff)
    layout = dwindle
    max_fps=60
}

---------------------------------------------------------------------------------------
# БЛЮРЫ, ТЕНИ, СКРУГЛЕНИЯ
---------------------------------------------------------------------------------------
decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 0
    multisample_edges = 2
    blur = yes
    blur_size = 3
    blur_passes = 1
    blur_new_optimizations = on

    drop_shadow = yes
    shadow_range = 3
    shadow_render_power = 5
    col.shadow = rgba(2f343fff)

    # Затемнение неактивных окон
    dim_inactive = 1
    dim_strength = 0.6
}


---------------------------------------------------------------------------------------
# АНИМАЦИЯ
---------------------------------------------------------------------------------------
animations {
    enabled = yes

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}


---------------------------------------------------------------------------------------
# НАСТРОЙКА ПОВЕДЕНИЯ ОКОН
---------------------------------------------------------------------------------------
dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_is_master = 1
    # no_gaps_when_only = true
}


---------------------------------------------------------------------------------------
# ЖЕСТЫ
---------------------------------------------------------------------------------------
gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = off
}


---------------------------------------------------------------------------------------
# СЦЕНАРИИ ПРИ СТАРТЕ HYPERLAND
---------------------------------------------------------------------------------------
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic mouse V1 {
    sensitivity = -0.5
}


---------------------------------------------------------------------------------------
# ПРАВИЛА ОКОН (hyprctl clients - так можно узнать класс окна)
---------------------------------------------------------------------------------------
# Больше параметров тут: https://wiki.hyprland.org/Configuring/Window-Rules/

windowrulev2 = float,class:^(firefox)$
windowrule = move 50 90,^(firefox)$
windowrule = size 1350 900,^(firefox)$

windowrulev2 = float,class:^(telegramdesktop)$
windowrule = move 1450 90,^(telegramdesktop)$
windowrule = size 420 900,^(telegramdesktop)$

windowrulev2 = float,class:^(mpv)$
windowrule = move 560 315,^(mpv)$
windowrule = size 800 450,^(mpv)$

windowrulev2 = float,class:^(lutris)$
windowrule = move 285 90,^(lutris)$
windowrule = size 1350 900,^(lutris)$

windowrulev2 = float,class:^(lutris)$
windowrule = move 285 90,^(lutris)$
windowrule = size 1350 900,^(lutris)$


---------------------------------------------------------------------------------------
# ХОТКЕИ
---------------------------------------------------------------------------------------
$mainMod = SUPER
# Глобальные
bind = $mainMod, C, killactive, 
bind = $mainMod, M, exit, 
bind = $mainMod, F, togglefloating, 
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

bind = $mainMod CTRL, P, exec, poweroff
bind = $mainMod CTRL, R, exec, reboot

# Запуск софта
bind = $mainMod, RETURN, exec, alacritty
bind = $mainMod, N, exec, nemo
bind = $mainMod, D, exec, wofi --show drun -I
bind = $mainMod, B, exec, [workspace 2] blender
bind = $mainMod, I, exec, [workspace 3] inkscape
bind = $mainMod, PRINT, exec, grim

# Управление фокусом
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# Переключение воркспейсов
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Перемещение окна на другой воркспейс
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Переключение на другой воркспейс скролом мыши с зажатым mainMod
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Перемещение и ресайз окон ЛКМ ПКМ + mineMod
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# Ресайз
bind = $mainMod CTRL, left, resizeactive,-50 0
bind = $mainMod CTRL, right, resizeactive,50 0
bind = $mainMod CTRL, up, resizeactive,0 -50
bind = $mainMod CTRL, down, resizeactive,0 50
